//
//  MyLable.m
//  UI02_UILable_UITextField_UIButton_UIImageView
//
//  Created by wyx on 16/3/10.
//  Copyright © 2016年 Apon. All rights reserved.
//

#import "MyLable.h"

@implementation MyLable

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
-(instancetype)initWithFrame:(CGRect)frame text:(NSString *)text{
    self = [super initWithFrame:frame];
    if (self) {
        self.text = text;
    }
    //调用 config方法
    [self config];
    return self;
}
- (void)config {
    //右对齐
    self.textAlignment = NSTextAlignmentRight;
    //字体颜色
    self.textColor = [UIColor redColor];
    //字体大小
    self.font = [UIFont systemFontOfSize: 25];
    //加粗
    self.font = [UIFont boldSystemFontOfSize:25];
    //行数(0 表示没有限制)
    self.numberOfLines = 0;
    //断行模式
    self.lineBreakMode = NSLineBreakByWordWrapping;
    //文本阴影样色
    self.shadowColor = [UIColor grayColor];
    //文本阴影偏移量
    self.shadowOffset = CGSizeMake(2, 2);
}


@end
